<template>
    <div class="set">
        <div class="go_back" @click="back"></div>
        <div class="set_content">
            <router-link to="reset">
                <div class="bill">
                    <div class="title">重置登录密码</div>
                    <div class="go"></div>
                </div>
            </router-link>    
            <div class="bill" @click="loginOut">
                <div class="title">退出登录</div>
                <div class="go"></div>
            </div>                  
        </div>
    </div>    
</template>
<script>
    export default {
        name: 'Set',
        data () {
             return {

             }
        },
        created(){
            document.title="设置";
        },
        methods:{
            loginOut(){
                MessageBox({
                    title: '提示',
                    message: '确定要退出吗?',
                    showCancelButton: true
                }).then(action => {
                    if(action == 'confirm'){
                      localStorage.removeItem('token');
                      Toast('退出成功！');
                      this.$router.push({ path: '/' })
                    }
                })

            },
            back(){
                 this.$router.push({path:'/center'});   
            }
        }
    }
</script>
<style scoped>
.set{position: fixed;width:100%;height:100%;background:#F8F8F8;}
.go_back{width:48px;height:48px;background:url("/static/images/team_go_back.png") no-repeat center center;background-size:100% 100%;margin:20px 0 20px 16px;}
.set_content{width:698px;margin:0 auto;background:#FFF;border-radius:20px;font-size:28px;color:#000000;}
.bill{width:624px;height:100px;line-height:100px;border-bottom:2px solid #F2F2F2;margin:0 auto;display:flex;justify-content: space-between;}
.bill:last-child{border:none;}
.go{
    width: 20px;
    height: 20px;
    border-bottom: 1px solid #979797;
    border-right: 1px solid #979797;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    margin-top:40px;
}
.set_content a{text-decoration: none;}
.title{color:#000000;}
</style>